﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace StorageInterface
{
    /// <summary>
    /// Interaction logic for AutorizationWindow.xaml
    /// </summary>
    public partial class AutorizationWindow : Window
    {
        public AutorizationWindow()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            if (passwordBox1.Password == "123" && textBox1.Text == "admin")
            {
                MainWindow mw = new MainWindow();
                mw.Show();
                Close();
            }
            else
                ErrorHandler.HandleError("Неверная пара логи/пароль!!!");
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

    }
}
